Skip to content

Improve error messages for {option,result}_map_unit_fn #5290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2020

Conversation

polybuildr
Copy link
Contributor

Instead of saying "unit function", use the phrase the description uses: "function that returns the unit type".

Fixes #5180.

changelog: Improve error messages for {option,result}_map_unit_fn

Instead of saying "unit function", use the phrase the description
uses: "function that returns the unit type".

Fixes rust-lang#5180.
@jpospychala
Copy link
Contributor

oh nice, I was looking into this same issue (#5180) this evening. Have you considered also changing the default placeholder from _ to something else as was suggested in another comment?

@polybuildr
Copy link
Contributor Author

Oops, sorry! I probably should have asked if anyone was already working on it.

I did consider changing the default placeholder but decided not to for now - but I missed the fact that it was suggesting calling the function with _ which is definitely bad enough to not keep around. Do you want to submit a separate PR for that? If not, I can work on it and add it to this one.

@jpospychala
Copy link
Contributor

yeah I have that part ready so I can submit a separate PR, although the original issue seems to small to have so many PRs..

@jpospychala
Copy link
Contributor

Added #5292

@phansch
Copy link
Member

phansch commented Mar 9, 2020

@bors r+ thanks!

@bors
Copy link
Contributor

bors commented Mar 9, 2020

📌 Commit ab6e709 has been approved by phansch

@bors
Copy link
Contributor

bors commented Mar 9, 2020

⌛ Testing commit ab6e709 with merge c7b395f...

@bors
Copy link
Contributor

bors commented Mar 9, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: phansch
Pushing c7b395f to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive 'option-map-unit-fn' for std::process::exit
4 participants